package com.rui.study.algorithm.T_响应式编程_RxJava;

import io.reactivex.Observable;

import java.util.Arrays;
import java.util.List;

/**
 * @program: study
 * @description:
 * @author: Yaowr
 * @create: 2019-03-18 17:15
 **/
public class RxJavaTest2 {
    static class Point {
        int x, y;

        public Point(int x, int y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public String toString() {
            return "("+x+", "+y+")";
        }
    }

    public static void main(String[] args) {
        Observable<Point> pointObservable = Observable.just(new Point(1, 2), new Point(3, 4));
        pointObservable.subscribe(p -> {
            System.out.println(p.toString());
        });
    }
}
